/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       dialog_school_of_magic.h

	$Header: /game/dialog_school_of_magic.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef DIALOG_SCHOOL_OF_MAGIC_H_INCLUDED
#define DIALOG_SCHOOL_OF_MAGIC_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>
#include "bitmap_group_ptr.h"
#include "game_window.h"
#include "button_group.h"

enum t_skill_type;
struct t_skill;
class t_player;
class t_button;
class t_creature_stack;
class t_creature_select_window;
class t_hero;
class t_single_use_object;
class t_text_window;
class t_army;

/*-------------------------------------------------------------------*\
** School of magic dialog
\* ------------------------------------------------------------------*/
class t_dialog_school_of_magic : public t_window
{
public:
	t_dialog_school_of_magic( t_window* parent );

	void init_dialog( std::vector<t_hero*> const& heroes, t_window* parent, t_single_use_object const& object, t_army* army,
                    t_skill_type skill_1, t_skill_type skill_2);

protected:

	t_bitmap_group_ptr          m_bitmaps_ptr;
	t_button*                   m_buy_button;
	t_text_window*              m_cost_window_ptr;
	int						    m_current_cost;
	t_creature_select_window*   m_hero_selection_window;
    t_single_use_object const*  m_parent_object;
	int						    m_player_funds;
	t_player *			        m_player_ptr;
    std::string                 m_rejected_text;
    t_skill_type                m_skill[2];
	t_button_group			    m_skill_button_group;
	t_bitmap_group_ptr			m_skill_frames;
	int						    m_skill_selected;
            
	void buy_clicked( t_button* button );
    void choose_skill( t_button* button, int id );
	void close_clicked( t_button* button );
    void create_skill_toggle_buttons (t_screen_rect skill_rect, t_skill skill, t_window* parent_window, int id);
    void hero_selection_change( t_creature_select_window*, t_creature_stack* );
};

#endif // DIALOG_SCHOOL_OF_MAGIC_H_INCLUDED


